/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#pragma once


#include <UI/UI.h>

#include "../ui属性栏.h"




class C_节点库滚动视口 : public C_Widget {
public:
	C_节点库滚动视口(S_UI渲染环境& ctx);
	~C_节点库滚动视口();

	uint32	m_背景;
	uint32	m_字符;
	uint32	m_图标;
	uint32	m_当前选择;
	uint32	m_焦点;

	C_项面板项*	m_当前选择项;


	std::vector<S_列表填充数据>	m_项数据;
	vec2	m_项大小;
	vec2	m_滚动坐标;
	//S_View属性 m_扩展视口属性;

	C_属性栏* mui_属性栏;
	C_状态条* mui_状态条;

	S_Props	m_插件名称;
	S_Props	m_构建目标;
	S_Props	m_构建;
	S_Props	m_清除;
	S_Props	m_加载插件;
	S_Props	m_卸载插件;

	S_Props	m_节点插件代码模板;
	S_Props	m_物体选择插件代码模板;
	S_Props	m_变换操作插件代码模板;
	S_Props	m_场景更新插件代码模板;

	S_插件*	m_当前选择插件;
private:

};



class C_库视口状态条 : public C_状态条 {

public:
	C_库视口状态条(S_UI渲染环境& ctx);
	~C_库视口状态条();

	S_Props				m_当前工作区节点树容器映射;
	C_节点库滚动视口*	m_View;

	S_Props				m_视口模块区;

	S_Props				m_创建插件初始名称;
	S_Props				m_创建插件模块;
	

};





C_节点库滚动视口* f_库视图_创建(S_UI渲染环境& ctx);

void f_库视口_添加节点项(C_节点库滚动视口* view, std::u16string name, std::u16string ico, int32 ID = -1, void* data = nullptr, uint32 type = 0);
void f_库视口_加载模块(C_节点库滚动视口* view, const std::string& 目录路径);
void f_库视口_加载插件模块(C_节点库滚动视口* view);

void f_库视口_重构状态条(C_状态条* 状态条);
void f_库视口_重构插件属性栏(C_属性栏* plane, S_插件* 插件, C_节点库滚动视口& view);

E_事件是否传递 f_NodeView_载入节点(C_Widget* self, E_键位执行状态 状态);

